export let tableOption = [{
    title: 'ID',
    key: 'id',
    align: 'center',
    width: '80'
  },
  {
    title: '名称',
    key: 'name',
    align: 'center'
  },
 {
    title: '类型',
    key: 'type',
    align: 'center',
    render: (h, params) => {
      let txt = '';
      switch (params.row.type) {
        case 0:
          txt = '满减'
          break;
        case 1:
          txt = '折扣'
          break;
         
      }
    
      return h('span', txt)
    }
  },


  {
    title: '使用限制',
    key: 'limit_type',
    align: 'center',
    render: (h, params) => {
      let txt = '';
      switch (params.row.limit_type) {
        case 0:
          txt = '无限制'
          break;
        case 1:
          txt = '订场'
          break;
        case 2:
          txt = '课程'
          break;
        case 3:
          txt = '课程单品'
          break;
        case 4:
          txt = '购物'
          break;
      }

      return h('span', txt)
    }
  },
  {
    title: '优惠金额',
    key: 'coupon_money',
    align: 'center',

  },
  {
    title: '满额使用',
    key: 'spend_money',
    align: 'center',

  },
  {
    title: '发放数量',
    key: 'send_num',
    align: 'center',

  },
  {
    title: '已领取',
    key: 'receive_num',
    align: 'center',

  },
  {
    title: '已使用',
    key: 'used_num',
    align: 'center',

  },
  {
    title: '使用期限',
    key: 'use_start_at',
    align: 'center',
    render: (h, params) => {
      let time = params.row.use_start_at + '至' + params.row.use_expire_at

      return h('span', time)
    }
  },
  {
     title: '状态',
     key: 'estate',
    slot: 'estate',
   },
  {
    title: '操作',
    slot: 'action',
    width: 200,
    align: 'center'

  }
]
